1. Field of the Invention
The present invention relates to the field of computer graphics. Specifically, the present invention relates to operations connected to combining two or more frames of data in computer graphics.
2. Related Art
Modem graphics offers seemingly unlimited opportunities for providing realistic two- and three- dimensional graphics. Modorn advances include visual simulation and virtual reality, where the user operates in an interactive graphics environment. Unfortunately, greater complexity in graphics images can interfere with maintaining a constant frame rate, which is the rate that graphics frames (comprising colored pixels) are output for visual display. When the frame rate is not constant, the transitions between frames are less continuous and less smooth, making for less realistic images for the viewer.
The Infinite Reality Graphics System.TM. is a well known and highly regarded graphics display system, sold by Silicon Graphics, Incorporated, (SGI). The Infinite Reality Graphics System.TM. can use the OpenGL.TM. application programming interface (API), which is also well known. In the graphics pipeline of this system, a host running OpenGL.TM. creates "vertices," describing the shapes of graphical objects. These vertices are sent to a geometry system, which calculates geometrical aspects of the graphical objects (including lighting and transformation calculations) to produce primitives or "lit triangles." The primitives are sent to a rasterization system, where various techniques are used to form two-dimensional fragments from the primitives. The fragments are combined into pixels in a frame buffer, with each pixel being a digital representation (via bits of data) of the fragments. The pixels for each graphics frame are read by a display system, converted to analog data, and transmitted for display on a screen.
The Infinite Reality Graphics System.TM. user is given the option of using overlay images, in addition to base images. Base images are the primary images processed by the system; they must be updated frequently by the system. Overlay images are images that are overlaid on top of the base images, and are typically updated less frequently than base images. For example, in a race car video game where the user has the viewpoint of the car's driver, the base images are the road and scenery traveled by the car, whereas the overlay image is the driver's control panel (including a frequently updated speedometer and fuel gauge).
There are separate frame buffers for the base image and the overlay image. To save space in an overlay frame buffer, the Infinite Reality Graphics System.TM. can use color indices, in place of the actual pixels, to store the graphical colors for the pixels. Color indices are values used to index into a color table, where the actual values are stored. However, the use of color indices causes a problem in that the overlay image and the base image of a frame cannot be blended. While the base image is stored as actual pixels, the overlay image is stored in encoded ("codebook") format. Thus, there is a need to be able to blend these images regardless of the format differences.
Moreover, as noted above, the complexity of the image can adversely affect the constancy of the frame rate. Like in most graphics systems, the graphics pipeline of the Infinite Reality System.TM. can be slowed down by complex images. Two process rates slow the pipeline most notably: first, the rate at which the geometry system produces the primitives; and second, the rate at which the primitives are rasterized into fragments, for loading into the frame buffer. Resizing of the base image can be performed to overcome the slow-down for complex images, but it is difficult (if not impossible) to blend the resized base image with the overlay image by previous methods. It must be noted that resizing of the base image is not well known, and has only been previously described in the copending application Ser. No. 08/620,215 (entitled "Dynamic Image Resizing," filed Mar. 22, 1996, and incorporated herein by reference). Furthermore, any other technique or processing performed on the base image will make combining the base and the overlay images difficult by previous methods. On an even broader level, there is a need in the computer graphics art to permit combining images of varying complexity, but at the same time to maintain high-resolution images at a constant frame rate. One desired application is to combine any two or more video streams, while maintaining few or no distortions. There is also a need to better utilize the bandwidth available in video graphics systems to maintain high resolution and smooth transitions between frames.